<template>
    <div class="con">
        {{value}}
        <button @click="add">+++</button>
        <button @click="reduce">---</button>
    </div>
</template>
<script>
export default {
    props: {
        value: Number,
        default: 0
    },
    methods: {
        add () {
           debugger
            this.$parent.value ++
        },
        reduce () {
             this.$parent.value --
        }
    }
}
</script>
<style scoped>
.con{
    color: #fff;
}
</style>